package com.ruoyi.service.service.impl;

import com.ruoyi.service.domain.ServicePackages;
import com.ruoyi.service.domain.ServiceSupplies;
import com.ruoyi.service.mapper.ServicePackagesMapper;
import com.ruoyi.service.service.IServicePackagesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 耗材包Service业务层处理
 * 
 * @author ZDL
 * @date 2024-10-21
 */
@Service
public class ServicePackagesServiceImpl implements IServicePackagesService 
{
    @Autowired
    private ServicePackagesMapper servicePackagesMapper;

    /**
     * 查询耗材包
     * 
     * @param packagesId 耗材包主键
     * @return 耗材包
     */
    @Override
    public ServicePackages selectServicePackagesByPackagesId(Long packagesId)
    {
        return servicePackagesMapper.selectServicePackagesByPackagesId(packagesId);
    }

    /**
     * 查询耗材包列表
     * 
     * @param servicePackages 耗材包
     * @return 耗材包
     */
    @Override
    public List<ServicePackages> selectServicePackagesList(ServicePackages servicePackages)
    {
        return servicePackagesMapper.selectServicePackagesList(servicePackages);
    }

    /**
     * 查询耗材包列表New
     *
     * @param servicePackages 耗材包
     * @return 耗材包
     */
    public List<ServicePackages> selectServicePackagesListNew(ServicePackages servicePackages)
    {
        return servicePackagesMapper.selectServicePackagesListNew(servicePackages);
    }

    /**
     * 新增耗材包
     * 
     * @param servicePackages 耗材包
     * @return 结果
     */
    @Override
    public int insertServicePackages(ServicePackages servicePackages)
    {
        return servicePackagesMapper.insertServicePackages(servicePackages);
    }

    /**
     * 修改耗材包
     * 
     * @param servicePackages 耗材包
     * @return 结果
     */
    @Override
    public int updateServicePackages(ServicePackages servicePackages)
    {
        return servicePackagesMapper.updateServicePackages(servicePackages);
    }

    /**
     * 批量删除耗材包
     * 
     * @param packagesIds 需要删除的耗材包主键
     * @return 结果
     */
    @Override
    public int deleteServicePackagesByPackagesIds(Long[] packagesIds)
    {
        return servicePackagesMapper.deleteServicePackagesByPackagesIds(packagesIds);
    }

    /**
     * 删除耗材包信息
     * 
     * @param packagesId 耗材包主键
     * @return 结果
     */
    @Override
    public int deleteServicePackagesByPackagesId(Long packagesId)
    {
        return servicePackagesMapper.deleteServicePackagesByPackagesId(packagesId);
    }

    /**
     * 查询耗材明细
     *
     * @param packagesId 耗材包主键
     * @return 结果
     */
    @Override
    public List<ServiceSupplies> selectServiceSuppliesListByPackagesId(Long packagesId) {
        return servicePackagesMapper.selectServiceSuppliesListByPackagesId(packagesId);
    }

}
